blob: 61eb4224c566ada70da6678ea2148b4b74cf7d40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- src/notebuffer.cpp.orig 2015-11-28 15:44:34 UTC
+++ src/notebuffer.cpp
@@ -248,7 +248,7 @@ namespace gnote {
Glib::RefPtr<Gtk::TextTag> depth = find_depth_tag(iter);
- return depth;
+ return (bool)depth;
}
@@ -1341,7 +1341,7 @@ namespace gnote {
if (iter.get_line() < buffer->get_line_count() - 1) {
Gtk::TextIter next_line = buffer->get_iter_at_line(iter.get_line()+1);
next_line_has_depth =
- NoteBuffer::Ptr::cast_static(buffer)->find_depth_tag (next_line);
+ (bool)NoteBuffer::Ptr::cast_static(buffer)->find_depth_tag (next_line);
}
bool at_empty_line = iter.ends_line () && iter.starts_line ();
@@ -1576,7 +1576,7 @@ namespace gnote {
NoteBuffer::Ptr note_buffer = NoteBuffer::Ptr::cast_dynamic(buffer);
// Do not insert bullet if it's already there
// this happens when using double identation in bullet list
- if(note_buffer->find_depth_tag(apply_start) == 0) {
+ if(!note_buffer->find_depth_tag(apply_start)) {
note_buffer->insert_bullet (apply_start, depth_tag->get_depth(), depth_tag->get_direction());
buffer->remove_all_tags (apply_start, apply_start);
offset += 2;
|