summaryrefslogtreecommitdiffstats
path: root/src/ui/desktop/menubar.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-08-11 16:30:56 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-08-11 16:30:56 +0000
commit06f8323665f34355a42f6e4378eb6de6b1a33802 (patch)
tree49769eacc61273a3debeb2dd599348598a5b68bb /src/ui/desktop/menubar.cpp
parentTranslated nb.po, 27% complete, and fixed some bad translations. (diff)
downloadinkscape-06f8323665f34355a42f6e4378eb6de6b1a33802.tar.gz
inkscape-06f8323665f34355a42f6e4378eb6de6b1a33802.zip
Silence a few warnings from 460193870ad22ad7611978c5d139149909f56664
Diffstat (limited to 'src/ui/desktop/menubar.cpp')
-rw-r--r--src/ui/desktop/menubar.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/desktop/menubar.cpp b/src/ui/desktop/menubar.cpp
index 6389def6a..8bb6d54b4 100644
--- a/src/ui/desktop/menubar.cpp
+++ b/src/ui/desktop/menubar.cpp
@@ -42,7 +42,7 @@
// ================= Common ====================
std::vector<std::pair<unsigned int, Gtk::CheckMenuItem *>> checkmenuitems;
-unsigned int lastverb = std::string::npos;
+unsigned int lastverb = -1;
;
// Sets tip
@@ -63,12 +63,12 @@ deselect_action(SPAction *action)
static void item_activate(Gtk::MenuItem *menuitem, SPAction *action)
{
if (action->verb->get_code() == lastverb) {
- lastverb = std::string::npos;
+ lastverb = -1;
return;
}
lastverb = action->verb->get_code();
sp_action_perform(action, nullptr);
- lastverb = std::string::npos;
+ lastverb = -1;
}
static void toggle_checkmenu(unsigned int emitting_verb, bool value)
@@ -76,12 +76,12 @@ static void toggle_checkmenu(unsigned int emitting_verb, bool value)
for (auto menu : checkmenuitems) {
if (emitting_verb == menu.first) {
if (emitting_verb == lastverb) {
- lastverb = std::string::npos;
+ lastverb = -1;
return;
}
lastverb = emitting_verb;
menu.second->property_active() = value;
- lastverb = std::string::npos;
+ lastverb = -1;
}
}
}