]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/iconpalette.C
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / iconpalette.C
index 72eccb139f1e9a907ba6136d2394edf48a5eb8d5..32cef52b5026c400bd74643f88c5d146139035d8 100644 (file)
@@ -82,7 +82,7 @@ void IconPalette::resizeEvent(QResizeEvent * e)
        if (!layout_->isEmpty() && maxcol == maxcol_)
                return;
 
-       int cols(width() / button_size);
+       int cols = max(width() / button_size, 1);
        int rows = max(int(buttons_.size() / cols), 1);
        if (buttons_.size() % cols)
                ++rows;