Disable MapRuler when switching tool buttons
This commit is contained in:
parent
39aa420265
commit
e2dd4fb76b
2 changed files with 5 additions and 2 deletions
|
@ -1967,8 +1967,8 @@ void Editor::objectsView_onMousePress(QMouseEvent *event) {
|
|||
if (map_item && map_item->paintingMode != MapPixmapItem::PaintMode::EventObjects) {
|
||||
return;
|
||||
}
|
||||
if (this->map_edit_mode == "paint" && event->buttons() & Qt::RightButton) {
|
||||
this->map_edit_mode = "select";
|
||||
if (this->obj_edit_mode == "paint" && event->buttons() & Qt::RightButton) {
|
||||
this->obj_edit_mode = "select";
|
||||
this->settings->mapCursor = QCursor();
|
||||
this->cursorMapTileRect->setSingleTileMode();
|
||||
this->ui->toolButton_Paint->setChecked(false);
|
||||
|
|
|
@ -2241,6 +2241,9 @@ void MainWindow::checkToolButtons() {
|
|||
else
|
||||
edit_mode = editor->obj_edit_mode;
|
||||
|
||||
if (edit_mode != "select" && editor->map_ruler)
|
||||
editor->map_ruler->endAnchor();
|
||||
|
||||
ui->toolButton_Paint->setChecked(edit_mode == "paint");
|
||||
ui->toolButton_Select->setChecked(edit_mode == "select");
|
||||
ui->toolButton_Fill->setChecked(edit_mode == "fill");
|
||||
|
|
Loading…
Reference in a new issue