diff --git a/src/document.h b/src/document.h index 70b89987..2114ce5b 100644 --- a/src/document.h +++ b/src/document.h @@ -711,6 +711,7 @@ struct Document { hover.g = nullptr; redrawpending = true; sys->UpdateStatus(selected); + sys->UpdateAmountStatus(selected); #ifdef __WXGTK__ // wxWidgets (wxGTK) does not always automatically update the scrollbar // to new canvas size and current position within after zoom so force it manually diff --git a/src/myframe.h b/src/myframe.h index 85826559..61d16581 100644 --- a/src/myframe.h +++ b/src/myframe.h @@ -667,7 +667,7 @@ struct MyFrame : wxFrame { ConstructToolBar(); - wxStatusBar *sb = CreateStatusBar(4); + wxStatusBar *sb = CreateStatusBar(5); SetStatusBarPane(0); SetDPIAwareStatusWidths(); sb->Show(sys->showstatusbar); @@ -1136,8 +1136,8 @@ struct MyFrame : wxFrame { } void SetDPIAwareStatusWidths() { - int swidths[] = {-1, FromDIP(300), FromDIP(120), FromDIP(100)}; - SetStatusWidths(4, swidths); + int swidths[] = {-1, FromDIP(300), FromDIP(120), FromDIP(100), FromDIP(150)}; + SetStatusWidths(5, swidths); } void OnDPIChanged(wxDPIChangedEvent &dce) { diff --git a/src/system.h b/src/system.h index 1b7e8095..5c361d18 100644 --- a/src/system.h +++ b/src/system.h @@ -441,6 +441,12 @@ struct System { } } + void UpdateAmountStatus(Selection &s) { + if (frame->GetStatusBar()) { + frame->SetStatusText(wxString::Format(_(L"%d cells"), s.xs * s.ys), 4); + } + } + void SaveCheck() { loop(i, frame->nb->GetPageCount()) { ((TSCanvas *)frame->nb->GetPage(i))->doc->AutoSave(!frame->IsActive(), i);