File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ void MovableWidget::mouseReleaseEvent(QMouseEvent *event) {
4343 (void )event;
4444}
4545
46- static bool hasSelection = false ;
46+ bool hasSelection = false ;
4747
4848void DrawingWidget::createSelection () {
4949 hasSelection = true ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ extern WhiteBoard *board;
3636extern QMainWindow* mainWindow;
3737
3838extern bool fuarMode;
39-
39+ extern bool hasSelection;
4040QPushButton *selectButton;
4141
4242QPushButton *penButton;
@@ -967,7 +967,7 @@ static void setupClear(){
967967 clearButtonLayout->addWidget (yesButton);
968968
969969 QPushButton *clear = create_button (" :images/clear.svg" , [=](){
970- if (drawing->penMode == SELECTION) {
970+ if (drawing->penMode == SELECTION && hasSelection ) {
971971 drawing->clearSelection ();
972972 return ;
973973 }
You can’t perform that action at this time.
0 commit comments